class MyRunable implements Runnable{
    public void run() {
        for (int i = 0; i < 5; i++) {
            System.out.println("实现Runable接口重写run方法");
        }
    }
}
public class Dome2 {
    public static void main(String[] args) {
        Thread t = new Thread(new MyRunable());
        t.start();
        for (int i = 0; i < 5; i++) {
            System.out.println("main线程运行结果");
        }
    }
}
